package com.neutech.maplestory.client.util;

import com.neutech.maplestory.client.constant.Constant;

import java.awt.*;
import java.util.HashMap;
import java.util.Map;

/**
 * CLASS:ImageUtil：
 * TODU:
 * date:2021/1/27、17:46
 * version:0.1
 */
public class ImageUtil {
    private static Map<String, Image>imagesMap = new HashMap<>();
    static {
        //logo
        imagesMap.put("logo",GameUtil.getImage("icon/logo"));
        //hero right stand
        for (int i = 0; i < 4; i++) {
            imagesMap.put("hero_right_stand"+i,GameUtil.getImage("hero/right/stand/stand1_"+i));
        }
        //hero left stand
        for (int i = 0; i < 4; i++) {
            imagesMap.put("hero_left_stand"+i,GameUtil.getImage("hero/left/stand/stand1_"+i));
        }
        //hero right walk
        for (int i = 0; i < 5; i++) {
            imagesMap.put("hero_right_walk"+i,GameUtil.getImage("hero/right/walk/walk1_"+i));
        }
        //hero left walk
        for (int i = 0; i < 5; i++) {
            imagesMap.put("hero_left_walk"+i,GameUtil.getImage("hero/left/walk/walk1_"+i));
       }
        imagesMap.put("hero_right_prone",GameUtil.getImage("hero/right/prone/prone_1"));
        imagesMap.put("hero_left_prone",GameUtil.getImage("hero/left/prone/prone_1"));

        imagesMap.put("hero_right_jump",GameUtil.getImage("hero/right/jump/jump_1"));
        imagesMap.put("hero_left_jump",GameUtil.getImage("hero/left/jump/jump_1"));

        for (int i = 0; i < 4; i++) {
            imagesMap.put("hero_right_shoot"+i,GameUtil.getImage("hero/right/shoot/shoot1_"+i));
        }
        for (int i = 0; i < 4; i++) {
            imagesMap.put("hero_left_shoot"+i,GameUtil.getImage("hero/left/shoot/shoot1_"+i));
        }
//        arrow
        imagesMap.put("arrow_right",GameUtil.getImage("arrow/right/hero_arrow"));
        imagesMap.put("arrow_left",GameUtil.getImage("arrow/left/hero_arrow"));
        for (int i = 0; i < 6; i++) {
            imagesMap.put("mob01_left_stand"+i,GameUtil.getImage("mob/mob01/left/stand/stand_"+i));
        }
        for (int i = 0; i < 6; i++) {
            imagesMap.put("mob01_left_move"+i,GameUtil.getImage("mob/mob01/left/move/move_"+i));
        }
        for (int i = 0; i < 6; i++) {
            imagesMap.put("mob01_left_die"+i,GameUtil.getImage("mob/mob01/left/die/die1_"+i));
        }
        imagesMap.put("blood",GameUtil.getImage("blood/blood"));
    }
    private ImageUtil(){}

    public static Image getImage(String key){
        return imagesMap.get(key);
    }
}
